{php include wl_template('common/header');}
<ul class="nav nav-tabs">
	<li class="active">
        <a href="{php echo web_url('order/log', array('op' => 'display'))}">退款列表</a>
    </li>
</ul>
{if $op=='display'}
<div class="main">
    <div class="panel panel-info">
	    <div class="panel-heading">筛选</div>
	    <div class="panel-body">
            <form action="./index.php" method="get" class="form-horizontal" role="form" id="form1">
                <input type="hidden" name="c" value="site" />
                <input type="hidden" name="a" value="entry" />
                <input type="hidden" name="m" value="lexiangpingou" />
                <input type="hidden" name="do" value="order" />
				<input type="hidden" name="ac" value="refund_log" />
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-4 col-lg-1 control-label">订单号</label>
                    <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
                        <input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}" placeholder="可查询订单号">
                    </div>
                    <label class="col-xs-12 col-sm-4 col-md-4 col-lg-1 control-label">微信订单号</label>
                    <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
                        <input class="form-control" name="transid" id="" type="text" value="{$_GPC['transid']}" placeholder="微信订单号">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-4 col-lg-1 control-label">用户信息</label>
                    <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
                        <input class="form-control" name="member" id="" type="text" value="{$_GPC['member']}" placeholder="可查询手机号 / 姓名">
                    </div>
                    <label class="col-xs-12 col-sm-4 col-md-4 col-lg-1 control-label">商品ID</label>
                    <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
                        <input class="form-control" name="goodsid" id="" type="text" value="{$_GPC['goodsid']}" placeholder="可查询商品编号">
                    </div>
                </div>
               
                <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-4 col-lg-1 control-label">退款时间</label>
                        <div class="col-sm-5 col-lg-7 col-xs-12">
                            {php echo tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d', $starttime),'endtime'=>date('Y-m-d', $endtime)));}
                        </div>
                        <div class="col-sm-3 col-lg-2" style="text-align:right;"><button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
                        </div>
                    </div>
                <div class="form-group">
                </div>
            </form>
            <!--<div class="form-group">
                <label class="col-xs-12 col-sm-4 col-md-4 col-lg-1 control-label" style="text-align: right;padding-right: 30px;">导出订单</label>
            	<a href='{php echo $this->createWebUrl('order', array('op' => 'output','status'=>$status,'keyword'=>$keyword,'transid'=>$transid,'member'=>$member,'pay_type'=>$pay_type,'starttime'=>$starttime,'endtime'=>$endtime,'time'=>$time))}'>
            		<button class="btn btn-info"><i class="fa fa-download"></i> 导出订单</button>（如果按条件导出请先选择条件后查询，再导出。）
            	</a>
	   		</div>-->
	   		<!--<a href='{php echo $this->createWebUrl('order', array('op' => 'refundall'))}'><button class="btn btn-danger"><i class="fa fa-align-justify"></i> 一键退款</button></a>-->
	    </div>
	</div>

	<div class="panel panel-default">
		<div class="panel-body table-responsive">
			<table class="table table-hover">
				<thead class="navbar-inner">
					<tr>
						<th style="width:80px;">退款类型</th>
						<th style="width:80px;">支付金额</th>
						<th style="width:80px;">退款金额</th>
						<th style="width:100px;">退款人姓名</th>
						<th style="width:110px;">退款人电话</th>
						<th style="width:140px;">商品名</th>
						<th style="width:280px;">微信订单号</th>
						<th style="width:280px;">微信退款单号</th>
						<th style="width:150px;">退款时间</th>
						<th style="width:50px;">成功与否</th>
						<th style="width:120px; text-align:right;">操作</th>
					</tr>
				</thead>
				<tbody>
					{loop $list $item}
					
					<tr>
						<td>{if $item['type']==1}用户手动退款{elseif $item['type']==2}后台退款{elseif $item['type']==3}团满退款{elseif $item['type']==4}部分退款{/if}</td>
						<td>{$item['payfee']}元</td>
						<td>{$item['refundfee']}元</td>
						<td>{$item['refundername']}</td>
						<td>{$item['refundermobile']}</td>
						<td>{$item['goodsname']}</td>
						<td>{$item['transid']}</td>
						<td>{$item['refund_id']}</td>
						<td>{php echo date('Y-m-d H:i:s', $item['createtime'])}</td>
						<td>{if $item['status']==1}成功{else}失败{/if}</td>
						<td style="text-align:right;">
							<a href="{php echo web_url('order/order/detail', array('id' => $item['orderid']))}" class="btn btn-success btn-sm">查看订单</a>
						</td>
					</tr>
					{/loop}
				</tbody>
			</table>
		</div>
	</div>
</div>
{$pager}
<script type="text/javascript">
	require(['daterangepicker'], function($){
		$('.daterange').on('apply.daterangepicker', function(ev, picker) {
			$('#form1')[0].submit();
		});
	});
</script>


<script>
	require(['bootstrap'],function($){
		$('.btn').hover(function(){
			$(this).tooltip('show');
		},function(){
			$(this).tooltip('hide');
		});
	});
</script>
{/if}
{template 'common/footer'}